home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / uriloader / nsIDownload.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  248 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIDownload.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIDownload_h__
  6. #define __gen_nsIDownload_h__
  7.  
  8.  
  9. #ifndef __gen_nsITransfer_h__
  10. #include "nsITransfer.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIURI; /* forward declaration */
  18.  
  19. class nsILocalFile; /* forward declaration */
  20.  
  21. class nsIObserver; /* forward declaration */
  22.  
  23. class nsICancelable; /* forward declaration */
  24.  
  25. class nsIWebProgressListener; /* forward declaration */
  26.  
  27. class nsIMIMEInfo; /* forward declaration */
  28.  
  29.  
  30. /* starting interface:    nsIDownload */
  31. #define NS_IDOWNLOAD_IID_STR "9e1fd9f2-9727-4926-85cd-f16c375bba6d"
  32.  
  33. #define NS_IDOWNLOAD_IID \
  34.   {0x9e1fd9f2, 0x9727, 0x4926, \
  35.     { 0x85, 0xcd, 0xf1, 0x6c, 0x37, 0x5b, 0xba, 0x6d }}
  36.  
  37. class NS_NO_VTABLE nsIDownload : public nsITransfer {
  38.  public: 
  39.  
  40.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOWNLOAD_IID)
  41.  
  42.   /**
  43.      * The target of a download is always a file on the local file system.
  44.      */
  45.   /* readonly attribute nsILocalFile targetFile; */
  46.   NS_IMETHOD GetTargetFile(nsILocalFile * *aTargetFile) = 0;
  47.  
  48.   /**
  49.      * The percentage of transfer completed.
  50.      * If the file size is unknown it'll be -1 here.
  51.      */
  52.   /* readonly attribute PRInt32 percentComplete; */
  53.   NS_IMETHOD GetPercentComplete(PRInt32 *aPercentComplete) = 0;
  54.  
  55.   /**
  56.      * The amount of kbytes downloaded so far.
  57.      */
  58.   /* readonly attribute PRUint64 amountTransferred; */
  59.   NS_IMETHOD GetAmountTransferred(PRUint64 *aAmountTransferred) = 0;
  60.  
  61.   /**
  62.      * The size of file in kbytes.
  63.      * Unknown size is represented by 0.
  64.      */
  65.   /* readonly attribute PRUint64 size; */
  66.   NS_IMETHOD GetSize(PRUint64 *aSize) = 0;
  67.  
  68.   /**
  69.      * The source of the transfer.
  70.      */
  71.   /* readonly attribute nsIURI source; */
  72.   NS_IMETHOD GetSource(nsIURI * *aSource) = 0;
  73.  
  74.   /**
  75.      * The target of the transfer.
  76.      */
  77.   /* readonly attribute nsIURI target; */
  78.   NS_IMETHOD GetTarget(nsIURI * *aTarget) = 0;
  79.  
  80.   /**
  81.      * Object that can be used to cancel the download.
  82.      * Will be null after the download is finished.
  83.      */
  84.   /* readonly attribute nsICancelable cancelable; */
  85.   NS_IMETHOD GetCancelable(nsICancelable * *aCancelable) = 0;
  86.  
  87.   /**
  88.      * The user-readable description of the transfer.
  89.      */
  90.   /* readonly attribute wstring displayName; */
  91.   NS_IMETHOD GetDisplayName(PRUnichar * *aDisplayName) = 0;
  92.  
  93.   /**
  94.      * The time a transfer was started.
  95.      */
  96.   /* readonly attribute long long startTime; */
  97.   NS_IMETHOD GetStartTime(PRInt64 *aStartTime) = 0;
  98.  
  99.   /**
  100.      * Optional. If set, it will contain the target's relevant MIME information.
  101.      * This includes it's MIME Type, helper app, and whether that helper should be
  102.      * executed.
  103.      */
  104.   /* readonly attribute nsIMIMEInfo MIMEInfo; */
  105.   NS_IMETHOD GetMIMEInfo(nsIMIMEInfo * *aMIMEInfo) = 0;
  106.  
  107. };
  108.  
  109. /* Use this macro when declaring classes that implement this interface. */
  110. #define NS_DECL_NSIDOWNLOAD \
  111.   NS_IMETHOD GetTargetFile(nsILocalFile * *aTargetFile); \
  112.   NS_IMETHOD GetPercentComplete(PRInt32 *aPercentComplete); \
  113.   NS_IMETHOD GetAmountTransferred(PRUint64 *aAmountTransferred); \
  114.   NS_IMETHOD GetSize(PRUint64 *aSize); \
  115.   NS_IMETHOD GetSource(nsIURI * *aSource); \
  116.   NS_IMETHOD GetTarget(nsIURI * *aTarget); \
  117.   NS_IMETHOD GetCancelable(nsICancelable * *aCancelable); \
  118.   NS_IMETHOD GetDisplayName(PRUnichar * *aDisplayName); \
  119.   NS_IMETHOD GetStartTime(PRInt64 *aStartTime); \
  120.   NS_IMETHOD GetMIMEInfo(nsIMIMEInfo * *aMIMEInfo); 
  121.  
  122. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  123. #define NS_FORWARD_NSIDOWNLOAD(_to) \
  124.   NS_IMETHOD GetTargetFile(nsILocalFile * *aTargetFile) { return _to GetTargetFile(aTargetFile); } \
  125.   NS_IMETHOD GetPercentComplete(PRInt32 *aPercentComplete) { return _to GetPercentComplete(aPercentComplete); } \
  126.   NS_IMETHOD GetAmountTransferred(PRUint64 *aAmountTransferred) { return _to GetAmountTransferred(aAmountTransferred); } \
  127.   NS_IMETHOD GetSize(PRUint64 *aSize) { return _to GetSize(aSize); } \
  128.   NS_IMETHOD GetSource(nsIURI * *aSource) { return _to GetSource(aSource); } \
  129.   NS_IMETHOD GetTarget(nsIURI * *aTarget) { return _to GetTarget(aTarget); } \
  130.   NS_IMETHOD GetCancelable(nsICancelable * *aCancelable) { return _to GetCancelable(aCancelable); } \
  131.   NS_IMETHOD GetDisplayName(PRUnichar * *aDisplayName) { return _to GetDisplayName(aDisplayName); } \
  132.   NS_IMETHOD GetStartTime(PRInt64 *aStartTime) { return _to GetStartTime(aStartTime); } \
  133.   NS_IMETHOD GetMIMEInfo(nsIMIMEInfo * *aMIMEInfo) { return _to GetMIMEInfo(aMIMEInfo); } 
  134.  
  135. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  136. #define NS_FORWARD_SAFE_NSIDOWNLOAD(_to) \
  137.   NS_IMETHOD GetTargetFile(nsILocalFile * *aTargetFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTargetFile(aTargetFile); } \
  138.   NS_IMETHOD GetPercentComplete(PRInt32 *aPercentComplete) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPercentComplete(aPercentComplete); } \
  139.   NS_IMETHOD GetAmountTransferred(PRUint64 *aAmountTransferred) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAmountTransferred(aAmountTransferred); } \
  140.   NS_IMETHOD GetSize(PRUint64 *aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSize(aSize); } \
  141.   NS_IMETHOD GetSource(nsIURI * *aSource) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSource(aSource); } \
  142.   NS_IMETHOD GetTarget(nsIURI * *aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \
  143.   NS_IMETHOD GetCancelable(nsICancelable * *aCancelable) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCancelable(aCancelable); } \
  144.   NS_IMETHOD GetDisplayName(PRUnichar * *aDisplayName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayName(aDisplayName); } \
  145.   NS_IMETHOD GetStartTime(PRInt64 *aStartTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStartTime(aStartTime); } \
  146.   NS_IMETHOD GetMIMEInfo(nsIMIMEInfo * *aMIMEInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMIMEInfo(aMIMEInfo); } 
  147.  
  148. #if 0
  149. /* Use the code below as a template for the implementation class for this interface. */
  150.  
  151. /* Header file */
  152. class nsDownload : public nsIDownload
  153. {
  154. public:
  155.   NS_DECL_ISUPPORTS
  156.   NS_DECL_NSIDOWNLOAD
  157.  
  158.   nsDownload();
  159.  
  160. private:
  161.   ~nsDownload();
  162.  
  163. protected:
  164.   /* additional members */
  165. };
  166.  
  167. /* Implementation file */
  168. NS_IMPL_ISUPPORTS1(nsDownload, nsIDownload)
  169.  
  170. nsDownload::nsDownload()
  171. {
  172.   /* member initializers and constructor code */
  173. }
  174.  
  175. nsDownload::~nsDownload()
  176. {
  177.   /* destructor code */
  178. }
  179.  
  180. /* readonly attribute nsILocalFile targetFile; */
  181. NS_IMETHODIMP nsDownload::GetTargetFile(nsILocalFile * *aTargetFile)
  182. {
  183.     return NS_ERROR_NOT_IMPLEMENTED;
  184. }
  185.  
  186. /* readonly attribute PRInt32 percentComplete; */
  187. NS_IMETHODIMP nsDownload::GetPercentComplete(PRInt32 *aPercentComplete)
  188. {
  189.     return NS_ERROR_NOT_IMPLEMENTED;
  190. }
  191.  
  192. /* readonly attribute PRUint64 amountTransferred; */
  193. NS_IMETHODIMP nsDownload::GetAmountTransferred(PRUint64 *aAmountTransferred)
  194. {
  195.     return NS_ERROR_NOT_IMPLEMENTED;
  196. }
  197.  
  198. /* readonly attribute PRUint64 size; */
  199. NS_IMETHODIMP nsDownload::GetSize(PRUint64 *aSize)
  200. {
  201.     return NS_ERROR_NOT_IMPLEMENTED;
  202. }
  203.  
  204. /* readonly attribute nsIURI source; */
  205. NS_IMETHODIMP nsDownload::GetSource(nsIURI * *aSource)
  206. {
  207.     return NS_ERROR_NOT_IMPLEMENTED;
  208. }
  209.  
  210. /* readonly attribute nsIURI target; */
  211. NS_IMETHODIMP nsDownload::GetTarget(nsIURI * *aTarget)
  212. {
  213.     return NS_ERROR_NOT_IMPLEMENTED;
  214. }
  215.  
  216. /* readonly attribute nsICancelable cancelable; */
  217. NS_IMETHODIMP nsDownload::GetCancelable(nsICancelable * *aCancelable)
  218. {
  219.     return NS_ERROR_NOT_IMPLEMENTED;
  220. }
  221.  
  222. /* readonly attribute wstring displayName; */
  223. NS_IMETHODIMP nsDownload::GetDisplayName(PRUnichar * *aDisplayName)
  224. {
  225.     return NS_ERROR_NOT_IMPLEMENTED;
  226. }
  227.  
  228. /* readonly attribute long long startTime; */
  229. NS_IMETHODIMP nsDownload::GetStartTime(PRInt64 *aStartTime)
  230. {
  231.     return NS_ERROR_NOT_IMPLEMENTED;
  232. }
  233.  
  234. /* readonly attribute nsIMIMEInfo MIMEInfo; */
  235. NS_IMETHODIMP nsDownload::GetMIMEInfo(nsIMIMEInfo * *aMIMEInfo)
  236. {
  237.     return NS_ERROR_NOT_IMPLEMENTED;
  238. }
  239.  
  240. /* End of implementation class template. */
  241. #endif
  242.  
  243. // {E3FA9D0A-1DD1-11B2-BDEF-8C720B597445}
  244. #define NS_DOWNLOAD_CID \
  245.     { 0xe3fa9d0a, 0x1dd1, 0x11b2, { 0xbd, 0xef, 0x8c, 0x72, 0x0b, 0x59, 0x74, 0x45 } }
  246.  
  247. #endif /* __gen_nsIDownload_h__ */
  248.